package com.cxx.home.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cxx.home.dto.food.*;
import com.cxx.home.vo.FoodQueryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FoodDao {
    FoodRecipeDto queryFoodRecipe(@Param("id") Long id);

    IPage<FoodSummaryDto> queryFoodSummary(IPage<FoodSummaryDto> page,
                                           @Param("query") FoodQueryVo foodQueryVo);

    List<FoodRecordDto> queryFoodRecordById(@Param("id") Long id);

    List<FoodRecordDto> queryFoodRecord(@Param("startDate") String startDate,
                                        @Param("endDate") String endDate);

    FoodStatsDto queryFoodStats();

    List<String> queryFoodCategory();

    void insertFoodMaterial(@Param("foodId") Long foodId,
                            @Param("list") List<FoodMaterialDto> list);

    void insertFoodStep(@Param("foodId") Long foodId,
                        @Param("list") List<FoodStepDto> list);

}
